﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UNSWThink
{
   /// <summary>
   /// Object that represents a Response entry in the database
   /// </summary>
   public class Response
   {
      private int id;
      private int questionID;
      private string description;
      private QuestionType type;

      /// <summary>
      /// Default constructor
      /// </summary>
      public Response()
      {
         id = 0;
         questionID = 0;
         description = String.Empty;
         type = QuestionType.OPN;
      }

      /// <summary>
      /// Alternative constructor
      /// </summary>
      /// <param name="id">
      /// ID of the record
      /// </param>
      /// <param name="questionID">
      /// ID of the related question
      /// </param>
      /// <param name="description">
      /// Description of the question
      /// </param>
      /// <param name="type">
      /// Question type that is response is related to
      /// </param>
      public Response(int id, int questionID, string description, QuestionType type)
      {
         this.id = id;
         this.questionID = questionID;
         this.description = description;
         this.type = type;
      }

      /// <summary>
      /// Gets or sets the ID
      /// </summary>
      public int ID
      {
         get
         {
            return id;
         }
         set
         {
            id = value;
         }
      }

      /// <summary>
      /// Gets or sets the question ID
      /// </summary>
      public int QuestionID
      {
         get
         {
            return questionID;
         }
         set
         {
            questionID = value;
         }
      }

      /// <summary>
      /// Gets or sets the description
      /// </summary>
      public string Description
      {
         get
         {
            return description;
         }
         set
         {
            description = value;
         }
      }

      /// <summary>
      /// Gets or sets the question type
      /// </summary>
      public QuestionType Type
      {
         get
         {
            return type;
         }
         set
         {
            type = value;
         }
      }
   }
}
